package cn.itsource.org.controller;

import cn.hutool.http.server.HttpServerRequest;
import cn.itsource.basic.annotation.Repeat;
import cn.itsource.basic.util.JsonResult;
import cn.itsource.org.domain.User;
import cn.itsource.org.pojo.Do.LoginDo;
import cn.itsource.org.service.IEmployeeService;
import cn.itsource.org.service.IUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * department控制层
 */
@RestController
@Api(tags = "登录管理")
public class LoginController {
    @Autowired
    private IEmployeeService employeeService;
    @Autowired
    private IUserService userService;
    @PostMapping("/userH/login")
    @ApiOperation(value = "登录",notes = "登录")
    public JsonResult userLogin(@RequestBody LoginDo loginDo){
        return employeeService.LoginVerify(loginDo);
    }
    @PostMapping("/shopF/login")
    @ApiOperation(value = "前端登录",notes = "前端登录")
    public JsonResult frontLogin(@RequestBody LoginDo loginDo){
        return userService.frontVerify(loginDo);
    }
}





